﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 仓库基础输入参数
/// </summary>
public class sywarehousenewBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 仓库编码
    /// </summary>
    public virtual string? warehousecode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public virtual string? warehousename { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("warehouse_type_table", AllowNullValue=true)]
    public virtual string? waretype { get; set; }
    
    /// <summary>
    /// 仓管员
    /// </summary>
    public virtual string? managers { get; set; }
    
    /// <summary>
    /// 地址
    /// </summary>
    public virtual string? warehouseaddress { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    public virtual string? warehousedescription { get; set; }
    
}

/// <summary>
/// 仓库分页查询输入参数
/// </summary>
public class PagesywarehousenewInput : BasePageInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    public string? warehousecode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    public string? warehousename { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("warehouse_type_table", AllowNullValue=true)]
    public string? waretype { get; set; }
    
    /// <summary>
    /// 仓管员
    /// </summary>
    public string? managers { get; set; }
    
    /// <summary>
    /// 地址
    /// </summary>
    public string? warehouseaddress { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    public string? warehousedescription { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 仓库增加输入参数
/// </summary>
public class AddsywarehousenewInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    [MaxLength(100, ErrorMessage = "仓库编码字符长度不能超过100")]
    public string? warehousecode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    [MaxLength(100, ErrorMessage = "仓库名称字符长度不能超过100")]
    public string? warehousename { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>
    [Dict("warehouse_type_table", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? waretype { get; set; }
    
    /// <summary>
    /// 仓管员
    /// </summary>
    [MaxLength(50, ErrorMessage = "仓管员字符长度不能超过50")]
    public string? managers { get; set; }
    
    /// <summary>
    /// 地址
    /// </summary>
    [MaxLength(500, ErrorMessage = "地址字符长度不能超过500")]
    public string? warehouseaddress { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    [MaxLength(500, ErrorMessage = "描述字符长度不能超过500")]
    public string? warehousedescription { get; set; }
    
}

/// <summary>
/// 仓库删除输入参数
/// </summary>
public class DeletesywarehousenewInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 仓库更新输入参数
/// </summary>
public class UpdatesywarehousenewInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 仓库编码
    /// </summary>    
    [MaxLength(100, ErrorMessage = "仓库编码字符长度不能超过100")]
    public string? warehousecode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>    
    [MaxLength(100, ErrorMessage = "仓库名称字符长度不能超过100")]
    public string? warehousename { get; set; }
    
    /// <summary>
    /// 类型
    /// </summary>    
    [Dict("warehouse_type_table", AllowNullValue=true)]
    [MaxLength(32, ErrorMessage = "类型字符长度不能超过32")]
    public string? waretype { get; set; }
    
    /// <summary>
    /// 仓管员
    /// </summary>    
    [MaxLength(50, ErrorMessage = "仓管员字符长度不能超过50")]
    public string? managers { get; set; }
    
    /// <summary>
    /// 地址
    /// </summary>    
    [MaxLength(500, ErrorMessage = "地址字符长度不能超过500")]
    public string? warehouseaddress { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>    
    [MaxLength(500, ErrorMessage = "描述字符长度不能超过500")]
    public string? warehousedescription { get; set; }
    
}

/// <summary>
/// 仓库主键查询输入参数
/// </summary>
public class QueryByIdsywarehousenewInput : DeletesywarehousenewInput
{
}

/// <summary>
/// 仓库数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportsywarehousenewInput : BaseImportInput
{
    /// <summary>
    /// 仓库编码
    /// </summary>
    [ImporterHeader(Name = "仓库编码")]
    [ExporterHeader("仓库编码", Format = "", Width = 25, IsBold = true)]
    public string? warehousecode { get; set; }
    
    /// <summary>
    /// 仓库名称
    /// </summary>
    [ImporterHeader(Name = "仓库名称")]
    [ExporterHeader("仓库名称", Format = "", Width = 25, IsBold = true)]
    public string? warehousename { get; set; }
    
    /// <summary>
    /// 类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public string? waretype { get; set; }
    
    /// <summary>
    /// 类型 文本
    /// </summary>
    [Dict("warehouse_type_table")]
    [ImporterHeader(Name = "类型")]
    [ExporterHeader("类型", Format = "", Width = 25, IsBold = true)]
    public string waretypeDictLabel { get; set; }
    
    /// <summary>
    /// 仓管员
    /// </summary>
    [ImporterHeader(Name = "仓管员")]
    [ExporterHeader("仓管员", Format = "", Width = 25, IsBold = true)]
    public string? managers { get; set; }
    
    /// <summary>
    /// 地址
    /// </summary>
    [ImporterHeader(Name = "地址")]
    [ExporterHeader("地址", Format = "", Width = 25, IsBold = true)]
    public string? warehouseaddress { get; set; }
    
    /// <summary>
    /// 描述
    /// </summary>
    [ImporterHeader(Name = "描述")]
    [ExporterHeader("描述", Format = "", Width = 25, IsBold = true)]
    public string? warehousedescription { get; set; }
    
}
